﻿using Nop.Core.Domain.Customers;
using System.Collections.Generic;

namespace Nop.Core.Domain.Security
{
	public class Permission : BaseEntity
	{
		private ICollection<CustomerRole> _customerRoles;

		/// <summary>
		/// 名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 系统名称
		/// </summary>
		public string SystemName { get; set; }
		/// <summary>
		/// 父Id
		/// </summary>
		public int ParentId { get; set; }
		/// <summary>
		/// 启用
		/// </summary>
		public bool Active { get; set; }
		/// <summary>
		/// 种类（1页面、2按钮...）
		/// </summary>
		public int KindId { get; set; }
		/// <summary>
		/// 排序
		/// </summary>
		public int DisplayOrder { get; set; }

		public virtual ICollection<CustomerRole> CustomerRoles
		{
			get { return _customerRoles ?? (_customerRoles = new List<CustomerRole>()); }
			protected set { _customerRoles = value; }
		}
	}
}
